find_package(GTest REQUIRED)
set(_exe_targets)

# Now simply link against gtest or GTest::gtest_main as needed. 
add_executable(item_utest item_test.cpp)
# 因为大量使用模板,导致代码增大,MSVC下要用/bigobj选项,否则会报错:error C1128
# GNU compiler 要用 -Wa,-mbig-obj 选项
target_compile_options(item_utest PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/bigobj> 
    $<$<AND:$<CXX_COMPILER_ID:GNU>,$<BOOL:${GNU_BIG_OBJ_FLAG_ENABLE}>>:-Wa,-mbig-obj>) 
target_link_libraries(item_utest GTest::gtest_main dtalk)
set_target_properties (item_utest  PROPERTIES FOLDER utest)
add_test(NAME TEST1 COMMAND item_utest)
############################################
enable_testing()
